package com.yun.service;

import com.github.pagehelper.PageHelper;
import com.yun.dao.PetMapper;
import com.yun.pojo.Pet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PetService implements PetMapper {

    @Autowired
    PetMapper petMapper;
    @Override
    public List<Pet> queryPets() {
        return petMapper.queryPets();
    }
    @Override
    public int savePet(Pet pet) {
        return petMapper.savePet(pet);
    }

    @Override
    public Pet queryPetById(int id) {
        return petMapper.queryPetById(id);
    }

    @Override
    public int deleteById(int id) {
        return petMapper.deleteById(id);
    }

    @Override
    public int updatePet(Pet pet) {
        return petMapper.updatePet(pet);
    }

    @Override
    public List<Pet> queryPetBySickroom(String pSickroom) {
        return petMapper.queryPetBySickroom(pSickroom);
    }

    @Override
    public List<Pet> queryPetByName(String name) {
        return petMapper.queryPetByName(name);
    }
}
